package com.googlecode.publicholiday.config;

import com.googlecode.publicholiday.web.PublicHolidayController;
import com.googlecode.publicholiday.web.SpringPublicHolidayController;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class WebControllerConfig {

    @Autowired
    private ServiceConfig serviceConfig;

    @Bean
    public SpringPublicHolidayController publicHolidayController() {
        return new SpringPublicHolidayController(serviceConfig.publicHolidayService());
    }

}
